<template>
  <div class="content-item">
    <p>学生信息：{{stuInfo.name}}（{{stuInfo.sn}}）{{stuInfo.gender}} {{stuInfo.objectOrientedName}} {{stuInfo.collegeName}}>{{stuInfo.majorName}}>{{stuInfo.gradeName}}>{{stuInfo.className}}</p>
    <p>入住信息：{{stuInfo.checkInInfo}}</p>
    <TabList :tabData="tabData"
             :specCol="specCol"
             class=" table-header-gray"
             :columns="columns"></TabList>
  </div>
</template>
<script>
import {
  listAdjustRecordUsingGET
} from '@api/auto'
export default {
  data () {
    return {
      tabData: [],
      stuInfo: {},
      columns: [
        { label: '调整时间', prop: 'createAt' },
        { label: '调整类型', prop: 'applianceType' },
        { label: '调整前', prop: 'beforPlace' },
        { label: '调整后', prop: 'afterPlace' },
        { label: '调整人员', prop: 'adjustName' }
      ],
      specCol: [
        { label: '调整类型',
          prop: 'applianceType',
          tem: `<span>{{$transType(row.applianceType)}}</span>` },
        { label: '调整时间',
          prop: 'createAt',
          tem: `<span>{{$moment(row.createAt).format('YYYY-MM-DD HH:mm:ss')}}</span>` }
      ]
    }
  },
  created () {
    this.stuInfo = JSON.parse(sessionStorage.stuInfo)
    listAdjustRecordUsingGET(this.stuInfo.sn).then(res => {
      this.tabData = res.data
    })
  }
}
</script>
